﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections;
using System.Text;
using Models;

namespace IDAL
{
    public interface INewsInfo
    {
        List<NewsInfo> GetAllNewsInfo(int pagesize, int nowpage);
        List<NewsInfo> GetNewsInfo(int NewsID);
        NewsInfo GetOneNewsInfo(int NewsID);
        List<NewsInfo> GetCategoryNewsInfo(int CategoryID, int pagesize, int nowpage);
        int GetPageCount(int pagesize,int CategoryID);
        List<NewsInfo> GetPageNewsInfo();
        int AddNewsInfo(NewsInfo news);
        int UpdateNewsInfo(NewsInfo news);
        ArrayList GetPreNewsInfo(int nowNewsID,int categoryID);
        ArrayList GetNextNewsInfo(int nowNewsID,int categoryID);
        int NewsInfoCountAdd(int NewsID);
        /// <summary>
        /// 删除指定的新闻
        /// </summary>
        /// <param name="NewsID"></param>
        /// <returns></returns>
        int DeleteNewsInfo(int NewsID);

        /// <summary>
        /// 获取指定新闻分类中的新闻数目
        /// </summary>
        /// <param name="CategoryID"></param>
        /// <returns></returns>
        int GetCategoryNewsInfoCount(int CategoryID);
    }
}
